package com.yc.cloud.admin.dto.request;

import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotNull;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.Min;
import lombok.Data;

import java.time.LocalDateTime;

/**
 * 设备录像记录创建参数
 *
 * @author kinggu
 * @since 2025-01-03
 */
@Data
@Schema(description = "设备录像记录创建参数")
public class HwDeviceVideoRecordCreateReqDTO {

    @Schema(description = "设备ID", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotNull(message = "设备ID不能为空")
    private Long deviceId;

    @Schema(description = "流ID", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotBlank(message = "流ID不能为空")
    private String stream;

    @Schema(description = "录制开始时间", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotNull(message = "开始时间不能为空")
    private LocalDateTime startTime;

    @Schema(description = "录制结束时间", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotNull(message = "结束时间不能为空")
    private LocalDateTime endTime;

    @Schema(description = "录制时长(秒)", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotNull(message = "时长不能为空")
    @Min(value = 1, message = "时长必须大于0")
    private Integer duration;

    @Schema(description = "文件大小(字节)", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotNull(message = "文件大小不能为空")
    @Min(value = 1, message = "文件大小必须大于0")
    private Long fileSize;

    @Schema(description = "原始文件路径")
    private String originalFilePath;

    @Schema(description = "文件ID", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotBlank(message = "文件ID不能为空")
    private String fileId;

    @Schema(description = "缩略图文件ID")
    private String thumbnailFileId;

    @Schema(description = "摄像头ID")
    private Long cameraId;
}
